<include file="Common/header-control" />
<div class="row">
    <div class="col-md-12">
        <ul class="nav nav-tabs">
            <foreach name="types" item="type">
                <li{$t == $type['name'] ? ' class="active"' : ''}><a href="{:U('control/extend/list?t=' . $type['name'])}">{$type['title']} <if condition="count($type['entities']) gt 0"><span class="badge">{:count($type['entities'])}</span></if></a></li>
            </foreach>
        </ul>
    </div>
    <div class="box col-md-12">
        <div class="box-inner">
            <div class="box-header well" data-original-title="">
                <h2><i class="fa fa-list"></i> 扩展列表</h2>
            </div>
            <div class="box-content">
                <if condition="!empty($types[$t]['entities'])">
                    <foreach name="types[$t]['entities']" item="row">
                        <div class="media" style="margin:10px auto;">
                            <a class="pull-left" href="javascript:;">
                                <img src="{$row['icon']}" class="img-rounded" width="80" height="80">
                            </a>
                            <div class="media-body">
                                <div class="row">
                                    <div class="col-sm-8">
                                        <h4 class="media-heading"><a href="javascript:;">{$row['title']}</a></h4>
                                        {$row['description']}
                                    </div>
                                    <div class="col-sm-4">
                                        <div class="btn-group btn-group-sm">
                                            <a class="btn btn-default" href="{:U('control/extend/uninstall?addon=' . $row['name'])}">卸载扩展</a>
                                            <a class="btn btn-default" href="{$row['url']}" target="_blank">去发布页</a>
                                            <a class="btn btn-primary" href="javascript:;">更新</a>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </foreach>
                    <else/>
                    <div class="alert alert-info">还没有这类型的扩展</div>
                </if>
            </div>
        </div>
    </div>
</div>
<include file="Common/footer-control" />
